#ifndef WIKICUSTOMDIALOG_H
#define WIKICUSTOMDIALOG_H

#include <QDialog>


class QListWidgetItem;
namespace Ui {
class WikiCustomDialog;
}

class WikiCustomDialog : public QDialog
{
    Q_OBJECT

public:
    explicit WikiCustomDialog(QWidget *parent = nullptr);
    ~WikiCustomDialog();

    QVariantMap item_to_map(const QListWidgetItem *item);
    QVariantList list_item_to_vlist();

    QListWidgetItem* vmap_to_item(QVariantMap map);

private slots:
    void on_listWidget_customContextMenuRequested(const QPoint &pos);

    void on_action_add_item_triggered();

    void on_action_remove_item_triggered();

    void on_listWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);

    void on_edit_name_textChanged(const QString &arg1);

    void on_edit_prefix_textChanged(const QString &arg1);

    void on_plain_editor_textChanged();

    void on_plain_javascript_textChanged();

    void on_plain_blockurls_textChanged();

    void on_plain_comment_textChanged();

    void on_action_import_dataset_triggered();

    void on_action_export_dataset_triggered();

    void on_action_export_select_triggered();

    void on_btn_super_clicked();

private:
    Ui::WikiCustomDialog *ui;

    bool m_busy;
    void load_list_item();
    void save_list_item();
};

#endif // WIKICUSTOMDIALOG_H
